package com.kuangshen.scanner;

import java.util.Scanner;
public class Demo4
{ public static void main(String[] args) {
        int count = 0;
        double sum = 0;
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入");
        while(scanner.hasNextDouble()){
            double i = scanner.nextDouble();
            count++;
            sum = sum + i;
        }
        System.out.println("您输入了"+count+"个数");
        System.out.println("他们的总和为"+sum);
        System.out.println("他们的平均数为"+sum/count);
        scanner.close();
    }
}
